<template>
  <div id="analysislist"> 


          <el-table :data="datalist" style="width: 100%" :height="dtheight" :header-cell-style="{background:'#4F81BC',color:'white'}"
          :row-class-name="tableRowClassName"  :border="true" v-loading="loading">
                <el-table-column label="名称"  align='center' >                   
                    <template slot-scope="scope">                   
                        <span>{{ scope.row.nickname }}</span>
                    </template>
                </el-table-column>
                 <el-table-column label="手机号"  align='center' >                   
                    <template slot-scope="scope">                   
                        <span>{{ scope.row.telphone }}</span>
                    </template>
                </el-table-column>
                  <el-table-column label="推荐人"  align='center' >                   
                    <template slot-scope="scope">                   
                        <span>{{ scope.row.inviter_telphone }}</span>
                    </template>
                </el-table-column>
                <el-table-column label="总收益"  align='center' >                   
                    <template slot-scope="scope">                   
                        <span>{{ scope.row.all_earn }}</span>
                    </template>
                </el-table-column>
                 <el-table-column :label="variable_name1"  align='center' >                   
                    <template slot-scope="scope">                   
                        <span>{{ scope.row.kmb }}</span>
                    </template>
                </el-table-column>
                 <el-table-column :label="variable_name2"  align='center' >                   
                    <template slot-scope="scope">                   
                        <span>{{ scope.row.gdb }}</span>
                    </template>
                </el-table-column>
                 <el-table-column label="持有金额"  align='center' >                   
                    <template slot-scope="scope">                   
                        <span>{{ scope.row.holding_all_price }}</span>
                    </template>
                </el-table-column>
                 <el-table-column label="持有数量"  align='center' >                   
                    <template slot-scope="scope">                   
                        <span>{{ scope.row.holding_count }}</span>
                    </template>
                </el-table-column>
                <el-table-column label="待收货数量"  align='center' >                   
                    <template slot-scope="scope">                   
                        <span>{{ scope.row.wait_harvest }}</span>
                    </template>
                </el-table-column>
                 <el-table-column label="待收货价值"  align='center' >                   
                    <template slot-scope="scope">                   
                        <span>{{ scope.row.wait_harvest_price }}</span>
                    </template>
                </el-table-column>
                  <el-table-column label="预警一级"  align='center' >                   
                    <template slot-scope="scope">                   
                        <span><i class="el-icon-view el-icon--right" @click="see_but(scope.row.uid)"></i></span>
                    </template>
                </el-table-column>
                 <el-table-column label="预警二级"  align='center' >                   
                    <template slot-scope="scope">                   
                        <span><i class="el-icon-view el-icon--right" @click="see_but(scope.row.uid)"></i></span>
                    </template>
                </el-table-column>

            </el-table>  


            <el-dialog title="预警查看" :visible.sync="see_mtk"  width="400px" >
                     <el-form ref="form"  label-width="100px" style="width:100%;">
                            <el-form-item v-for="(item,index) in see_data" :key="index" :label="item.title" label-width="80px" >
                                <div style="display: flex;">
                                    <el-input style="width:80px;" v-model="item.warning_one" placeholder="" readonly="readonly"></el-input>
                                    <div style="width:20px;height:40px;line-height:40px;text-align: center;"> - </div>
                                    <el-input  style="width:80px;" v-model="item.warning_two" placeholder="" readonly="readonly"></el-input>
                                </div>
                            </el-form-item> 
               
                        </el-form>
            </el-dialog> 

   </div>
</template>

<script>

export default {
   name: 'analysislist',
   props:{
      datalist:{  
        //type:Array,
       default:()=>[]
     },
     export_datalist:{
         default:()=>[]
     },
     loading:{
        type: Boolean,
    }
  },
  data () {
    return {
        dtheight:'500',  //窗口高度
        see_mtk:false,
        see_data:[],
        my_uid:'',
    
    }
  },
   components:{

  },
  created(){
     this.dtheight = window.innerHeight - 620
      
    // this.dtheight = window.innerHeight - 500
  },
  mounted (){
    
  },
  methods: {
      see_fun(){
        this.post("/early_warn/warningOfSome", {
              uid:this.my_uid
	         }).then(res => {
               this.see_data = res.result
               console.log(res,"ssss")
          })
    },
      see_but(uid){
          this.my_uid = uid
          this.see_fun()
          this.see_mtk = true
          
      },

    handleSelectionChange(arr){
          console.log(arr);
      
    },
  
  }
}
</script>


<style scoped>

</style>